package com.hksj.cbm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hksj.cbm.dto.DeviceRoomTrusteeshipConfigQueryDTO;
import com.hksj.cbm.entity.DeviceRoomTrusteeshipConfig;
import com.hksj.cbm.vo.DeviceRoomTrusteeshipConfigVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author fjt
 * @data 2024/8/17 15:34
 * @describe todo
 */
@Mapper
public interface DeviceRoomTrusteeshipConfigMapper extends BaseMapper<DeviceRoomTrusteeshipConfig> {


    /**
     * 查询指定楼层内全部可用的房间和当前设备已经设置的房间（指定楼层内的房间中，去掉其他设备已经设置的房间）
     * @param dto
     * @return
     */
    List<DeviceRoomTrusteeshipConfigVO> queryRoomByDeviceId(@Param("dto")DeviceRoomTrusteeshipConfigQueryDTO dto);

    /**
     * 查询当前路径下的房间信息
     * @param paths
     * @return
     */
    List<Long> queryRoomByPaths(@Param("paths")String paths);

    /**
     * 查询当前设备在当前楼层内原有的房间配置信息
     * @param list
     * @param deviceId
     * @return
     */
    List<DeviceRoomTrusteeshipConfig> queryConfigByDeviceId(@Param("list")List<Long> list, @Param("deviceId")String deviceId);


}
